package org.mags.dao.provider;

import org.mags.dao.common.DatabaseContext;
import org.mags.dao.common.ProviderFactory;
import org.springframework.util.Assert;

public abstract class AbstractModuleProviderFactories implements ModuleProviderFactories {
	public AbstractModuleProviderFactories() {
	}
	public AbstractModuleProviderFactories(DatabaseContext dataContext) {
		Assert.notNull(dataContext, "dataContext can't be null");
		dataContext.addProviderFactory(this);
	}
	@Override
	public void refreshAll() {
		for(ProviderFactory f: getFactories()) 
			f.refreshAll();
	}
}
